<template lang="pug">
	.web-view-warp
		web-view(:src="url" @message="getMessage")
</template>

<script>
export default {
	name: '',
	data() {
		return {
			url: ''
		}
	},
	props: [],
	computed: {},
	created() {},
	onPullDownRefresh() {},
	mounted() {
		let urlInfo = ''
		let that = this
		this.wx.getStorage({
			key: 'jumpUrl',
			success(res) {
				urlInfo = res.data
				that.url = urlInfo.url + '?'
				let searchArray = []
				let jsonArray = Object.entries(urlInfo.params || {})
				jsonArray.forEach(item => {
					searchArray.push(item[0] + '=' + item[1])
				})
				searchArray = searchArray.join('&')
				that.url = urlInfo.url + '?' + searchArray
				that.wx.setNavigationBarTitle({
					title: urlInfo.title
				})
			},
			fail() {
				that.showToast({
					title: '页面信息获取错误',
					icon: 'none'
				})
			}
		})
	},
	methods: {
		getMessage() {}
	},
	watch: {},
	components: {}
}
</script>

<style lang="stylus">

</style>
